<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon"
	href="http://training-static.linesno.com/switch_run/favicon.ico" />
<title>云主机管理后台</title>
<link
	href="http://training-static.linesno.com/vendor/bootstrap/css/bootstrap.min.css"
	rel="stylesheet">
<link
	href="http://training-static.linesno.com/sb-admin/css/sb-admin.css"
	rel="stylesheet">
<link
	href="http://training-static.linesno.com/vendor/fontawesome-free/css/all.min.css"
	rel="stylesheet" type="text/css">
<link
	href="http://training-static.linesno.com/vendor/datatables/dataTables.bootstrap4.css"
	rel="stylesheet">

</head>

<body>
	<div class="container-fluid">
		<br />
		<form>
			<div class="form-group">
				<label for="exampleInputEmail1">机房代码</label> <input type="text"
					class="form-control" name="masterCode" id="exampleInputEmail1"
					placeholder="机房代码">
			</div>
			<div class="form-group">
				<label for="exampleInputPassword1">机房名称</label> <input type="text"
					class="form-control" name="masterName" placeholder="机房名称">
			</div>
			<div class="form-group">
				<label for="exampleInputPassword1">排序</label> <input type="text"
					class="form-control" name="masterOrder" placeholder="排序">
			</div>

			<!-- 
				  <div class="form-group">
				    <label for="exampleInputPassword1">参数值</label>
				    <input type="text" class="form-control" name="paramValue" th:value="${bean.paramValue}"  placeholder="参数值">
				  </div>
				  -->

			<br />
			<button type="button" onclick="savemaster()"
				class="btn btn-primary btn-lg btn-block">保存</button>
		</form>
	</div>

	<script
		src="http://training-static.linesno.com/vendor/jquery/jquery.min.js"></script>
	<script
		src="http://training-static.linesno.com/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
	<script src="http://training-static.linesno.com/layer/layer.js"></script>

	<script type="text/javascript">
			function savemaster(){
				
				var _id = $("input[name=id]").val() ; 
				var _masterName= $("input[name=masterName]").val() ; 
				var _masterCode = $("input[name=masterCode]").val() ; 
				var _masterOrder = $("input[name=masterOrder]").val() ; 
				
				$.post("/manager/master_save" , {
					masterName:_masterName ,
					masterCode:_masterCode , 
					masterOrder:_masterOrder , 
				} , function(response){
					console.log("response = " + response) ;
					layer.msg(response.message);
				})
			}
		</script>

</body>
</html>
